package com.example.invoke.entity;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

@Repository
public interface UserRepo extends JpaRepository<User, Long> {

    @Modifying(clearAutomatically = true)
    @Query( value = "update tb_user set name = ?1 where id =?2")
    void updateUser(String name, Long id);
}
